<?php $this->pageTitle=Yii::app()->name . ' - '.UserModule::t("Profile");
$this->breadcrumbs=array(
	UserModule::t("Profile")=>array('profile'),
	UserModule::t("Edit"),
);
?><h2><?php echo UserModule::t('Edit profile'); ?></h2>
<?php //echo $this->renderPartial('menu'); ?>

<?php if(Yii::app()->user->hasFlash('profileMessage')): ?>
<div class="success">
<?php echo Yii::app()->user->getFlash('profileMessage'); ?>
</div>
<?php endif; ?>
<div class="form">
<?php $form=$this->beginWidget('UActiveForm', array(
	'id'=>'profile-form',
	'enableAjaxValidation'=>true,
	'htmlOptions' => array('enctype'=>'multipart/form-data', 'class'=>'form-horizontal'),
)); ?>

	<p class="note"><?php echo UserModule::t('Fields with <span class="required">*</span> are required.'); ?></p>

	<?php echo $form->errorSummary(array($model)); ?>

	<div class="control-group">
		<?php echo $form->labelEx($model,'userName', array('class'=>'control-label')); ?>
		<div class='controls'>
			<?php echo $form->textField($model,'userName',array('size'=>20,'maxlength'=>20)); ?>
		</div>
		<?php echo $form->error($model,'userName'); ?>
	</div>

	<div class="control-group">
		<?php echo $form->labelEx($model,'email', array('class'=>'control-label')); ?>
		<div class='controls'>
			<?php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>128)); ?>
		</div>
		<?php echo $form->error($model,'email'); ?>
	</div>

	<div class="control-group">
		<?php echo $form->labelEx($model,'firstName', array('class'=>'control-label')); ?>
		<div class='controls'>
			<?php echo $form->textField($model,'firstName',array('size'=>20,'maxlength'=>20)); ?>
		</div>
		<?php echo $form->error($model,'firstName'); ?>
	</div>
	
	<div class="control-group">
		<?php echo $form->labelEx($model,'lastName', array('class'=>'control-label')); ?>
		<div class='controls'>
			<?php echo $form->textField($model,'lastName',array('size'=>20,'maxlength'=>20)); ?>
		</div>
		<?php echo $form->error($model,'lastName'); ?>
	</div>
	
	<div class="control-group buttons">
		<div class="controls">
			<?php echo CHtml::submitButton($model->isNewRecord ? UserModule::t('Create') : UserModule::t('Save'), array('class'=>'btn')); ?>
		</div>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
